<%--
功能: 如果要显示的字符串超过一定长度，则截取该长度的子字符串，末尾添加...；否则直接显示字符串 
--%>
<%@ tag body-content="empty"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ attribute name="value" required="true"%>
<%@ attribute name="length" required="true" description="需要显示的字符的长度" %>
<c:choose>
<c:when test="${fn:length(value)>length}">
   ${fn:substring(value,0,length) }...
</c:when>
<c:otherwise>
   ${value }
</c:otherwise>
</c:choose>